package com.yuanye.gwcit.fragments;

import com.yuanye.gwcit.GW;
import com.yuanye.gwcit.utils.GT;
import com.yuanye.yeecho.base.CommonTaskFragment;
import com.yuanye.yeecho.bean.KeyDataBean;
import com.yuanye.yeecho.utils.YY;

public class MacCheckFragment extends CommonTaskFragment {

    public MacCheckFragment() {
        setTaskName("MAC校验");
    }

    @Override
    public void execTask() {
        super.execTask();
        String input_mac;
        String device_mac = GT.getMacAddress();
        input_mac = GW.cfgPcba.getMacInput();
        appendLog("扫码MAC: "+input_mac + "\n设备MAC: "+device_mac);
        if (!input_mac.isEmpty() && input_mac.equalsIgnoreCase(device_mac)){
            appendLog("比对成功");
            addKeyData("mac_addr", input_mac,"本机mac地址值");
            passAndNext();
        }else{
            setFail();
        }
    }
}
